class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.string  :email
      t.string  :first_name,   :limit => 50, :null => false
      t.string  :last_name,    :limit => 50, :null => false
      t.string  :phone_number, :limit => 10
      t.integer :parent_id
      t.integer :organization_id
      t.integer :status_id
      t.integer :employment_id
      t.integer :rank_id
      t.datetime :deleted_at
      t.string :crypted_password
      t.string :password_salt
      t.string :persistence_token
      t.string :single_access_token
      t.datetime :last_login_at
      t.timestamps
    end
    add_index :users, :email
  end

  def self.down
    drop_table :users
    remove_index :users, :email
  end
end
